<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>易战后台管理系统</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="../../static/css/font.css">
	<link rel="stylesheet" href="../../static/css/xadmin.css">
    
<!--     <link rel="stylesheet" href="https://cdn.bootcss.com/Swiper/3.4.2/css/swiper.min.css">
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="https://cdn.bootcss.com/Swiper/3.4.2/js/swiper.jquery.min.js"></script> -->

    <link rel="stylesheet" href="../../static/css/swiper.min.css">
    <script type="text/javascript" src="../../static/js/jquery.min.js"></script>
    <script type="text/javascript" src="../../static/js/swiper.jquery.min.js"></script>

    <script src="../../static/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="../../static/js/xadmin.js"></script>

    {% block head %}
    {% endblock %}

</head>
{% block bodyweigh %}
<body>
{% endblock %}
    <!-- 顶部开始 -->
    <div class="container">
        <div class="logo"><a href="/app/index">易战后台管理系统</a></div>
        <div class="open-nav"><i class="iconfont">&#xe699;</i></div>
        <ul class="layui-nav right" lay-filter="">
          <li class="layui-nav-item">
            <a href="javascript:;">admin</a>
            <dl class="layui-nav-child"> <!-- 二级菜单 -->
              <dd><a href="">个人信息</a></dd>
              <dd><a href="">切换帐号</a></dd>
              <dd><a href="/app/login">退出</a></dd>
            </dl>
          </li>
          <!-- <li class="layui-nav-item"><a href="/">前台首页</a></li> -->
        </ul>
    </div>
    <!-- 顶部结束 -->
    <!-- 中部开始 -->
    <div class="wrapper">
        <!-- 左侧菜单开始 -->
        <div class="left-nav">
          <div id="side-nav">
            <ul id="nav">
                <li class="list" current>
                    <a href="/app/index">
                        <i class="iconfont">&#xe761;</i>
                        欢迎页面
                        <i class="iconfont nav_right">&#xe697;</i>
                    </a>
                </li>
                <li class="list">
                    <a href="javascript:;">
                        <i class="iconfont">&#xe70b;</i>
                        赛事管理
                        <i class="iconfont nav_right">&#xe697;</i>
                    </a>
                    <ul class="sub-menu">
                        <li>
                            <a href="/app/show/event">
                                <i class="iconfont">&#xe6a7;</i>
                                赛事列表
                            </a>
                        </li>
<!--                         <li>
                            <a href="#">
                                <i class="iconfont">&#xe6a7;</i>
                                赛事删除
                            </a>
                        </li> -->
                    </ul>
                </li>
                <li class="list" >
                    <a href="javascript:;">
                        <i class="iconfont">&#xe6a3;</i>
                        游戏管理
                        <i class="iconfont nav_right">&#xe697;</i>
                    </a>
                    <ul class="sub-menu">
                        <li>
                            <a href="/app/show/game">
                                <i class="iconfont">&#xe6a7;</i>
                                游戏列表
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="list" >
                    <a href="javascript:;">
                        <i class="iconfont">&#xe6a3;</i>
                        战队管理
                        <i class="iconfont nav_right">&#xe697;</i>
                    </a>
                    <ul class="sub-menu" style="display:none">
                        <li>
                            <a href="/app/show/team">
                                <i class="iconfont">&#xe6a7;</i>
                                战队列表
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="list" >
                    <a href="javascript:;">
                        <i class="iconfont">&#xe6a3;</i>
                        用户管理
                        <i class="iconfont nav_right">&#xe697;</i>
                    </a>
                    <ul class="sub-menu" style="display:none">
                        <li>
                            <a href="/app/show/user">
                                <i class="iconfont">&#xe6a7;</i>
                                用户列表
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="list" >
                    <a href="javascript:;">
                        <i class="iconfont">&#xe6a3;</i>
                        新闻管理
                        <i class="iconfont nav_right">&#xe697;</i>
                    </a>
                    <ul class="sub-menu" style="display:none">
                        <li>
                            <a href="/app/show/news_list">
                                <i class="iconfont">&#xe6a7;</i>
                                新闻列表
                            </a>
                        </li>
                        <li>
                            <a href="/app/show/write_news">
                                <i class="iconfont">&#xe6a7;</i>
                                添加新闻
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="list" >
                    <a href="javascript:;">
                        <i class="iconfont">&#xe6a3;</i>
                        首页管理
                        <i class="iconfont nav_right">&#xe697;</i>
                    </a>
                    <ul class="sub-menu" style="display:none">
                        <li>
                            <a href="/app/show/banners">
                                <i class="iconfont">&#xe6a7;</i>
                                banner列表
                            </a>
                        </li>
                        <li>
                            <a href="/app/show/add_banners">
                                <i class="iconfont">&#xe6a7;</i>
                                添加banner
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="list" >
                    <a href="javascript:;">
                        <i class="iconfont">&#xe6a3;</i>
                        问题管理
                        <i class="iconfont nav_right">&#xe697;</i>
                    </a>
                    <ul class="sub-menu" style="display:none">
                        <li>
                            <a href="/app/show/questions_list">
                                <i class="iconfont">&#xe6a7;</i>
                                问题列表
                            </a>
                        </li>
                        <li>
                            <a href="/app/show/add_questions">
                                <i class="iconfont">&#xe6a7;</i>
                                添加问题
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="list" >
                    <a href="javascript:;">
                        <i class="iconfont">&#xe6a3;</i>
                        预约管理
                        <i class="iconfont nav_right">&#xe697;</i>
                    </a>
                    <ul class="sub-menu" style="display:none">
                        <li>
                            <a href="/app/show/reservation_list">
                                <i class="iconfont">&#xe6a7;</i>
                                预约名单列表
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="list" >
                    <a href="javascript:;">
                        <i class="iconfont">&#xe6a3;</i>
                        消息管理
                        <i class="iconfont nav_right">&#xe697;</i>
                    </a>
                    <ul class="sub-menu" style="display:none">
                        <li>
                            <a href="/app/user_message/send">
                                <i class="iconfont">&#xe6a7;</i>
                                推送消息
                            </a>
                        </li>
                    </ul>
                </li>
                <!-- <li class="list" >
                    <a href="javascript:;">
                        <i class="iconfont">&#xe6a3;</i>
                        系统统计
                        <i class="iconfont nav_right">&#xe697;</i>
                    </a>
                    <ul class="sub-menu" style="display:none">
                        <li>
                            <a href="./echarts1.html">
                                <i class="iconfont">&#xe6a7;</i>
                                拆线图
                            </a>
                        </li>
                        <li>
                            <a href="./echarts2.html">
                                <i class="iconfont">&#xe6a7;</i>
                                柱状图
                            </a>
                        </li>
                        <li>
                            <a href="./echarts3.html">
                                <i class="iconfont">&#xe6a7;</i>
                                地图
                            </a>
                        </li>
                        <li>
                            <a href="./echarts4.html">
                                <i class="iconfont">&#xe6a7;</i>
                                饼图
                            </a>
                        </li>
                        <li>
                            <a href="./echarts5.html">
                                <i class="iconfont">&#xe6a7;</i>
                                k线图
                            </a>
                        </li>
                        <li>
                            <a href="./echarts6.html">
                                <i class="iconfont">&#xe6a7;</i>
                                仪表图
                            </a>
                        </li>
                        <li>
                            <a href="http://echarts.baidu.com/examples.html">
                                <i class="iconfont">&#xe6a7;</i>
                                更多案例
                            </a>
                        </li>
                    </ul>
                </li> -->
<!--                 <li class="list" >
                    <a href="javascript:;">
                        <i class="iconfont">&#xe6a3;</i>
                        系统设置
                        <i class="iconfont nav_right">&#xe697;</i>
                    </a>
                    <ul class="sub-menu" style="display:none">
                        <li>
                            <a href="./banner-list.html">
                                <i class="iconfont">&#xe6a7;</i>
                                轮播列表
                            </a>
                        </li>
                    </ul>
                </li> -->
            </ul>
          </div>
        </div>
        <!-- 左侧菜单结束 -->
        {% block content %}
        <!-- 右侧主体开始 -->
        <div class="page-content">
          <div class="content">
            <!-- 右侧内容框架，更改从这里开始 -->

            <fieldset class="layui-elem-field layui-field-title site-title">
              <legend><a name="default">信息统计</a></legend>
            </fieldset>
            <table class="layui-table">
                <thead>
                    <tr>
                        <th>统计</th>
                        <th>资讯库</th>
                        <th>图片库</th>
                        <th>产品库</th>
                        <th>用户</th>
                        <th>管理员</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>总数</td>
                        <td>92</td>
                        <td>9</td>
                        <td>0</td>
                        <td>8</td>
                        <td>20</td>
                    </tr>
                    <tr>
                        <td>今日</td>
                        <td>0</td>
                        <td>0</td>
                        <td>0</td>
                        <td>0</td>
                        <td>0</td>
                    </tr>
                    <tr>
                        <td>昨日</td>
                        <td>0</td>
                        <td>0</td>
                        <td>0</td>
                        <td>0</td>
                        <td>0</td>
                    </tr>
                    <tr>
                        <td>本周</td>
                        <td>2</td>
                        <td>0</td>
                        <td>0</td>
                        <td>0</td>
                        <td>0</td>
                    </tr>
                    <tr>
                        <td>本月</td>
                        <td>2</td>
                        <td>0</td>
                        <td>0</td>
                        <td>0</td>
                        <td>0</td>
                    </tr>
                </tbody>
            </table>
            <table class="layui-table">
                <thead>
                    <tr>
                        <th colspan="2" scope="col">服务器信息</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <th width="30%">服务器计算机名</th>
                        <td><span id="lbServerName">http://127.0.0.1/</span></td>
                    </tr>
                    <tr>
                        <td>服务器IP地址</td>
                        <td>192.168.1.1</td>
                    </tr>
                    <tr>
                        <td>服务器域名</td>
                        <td>x.xuebingsi.com</td>
                    </tr>
                    <tr>
                        <td>服务器端口 </td>
                        <td>80</td>
                    </tr>
                    <tr>
                        <td>服务器IIS版本 </td>
                        <td>Microsoft-IIS/6.0</td>
                    </tr>
                    <tr>
                        <td>本文件所在文件夹 </td>
                        <td>D:\WebSite\HanXiPuTai.com\XinYiCMS.Web\</td>
                    </tr>
                    <tr>
                        <td>服务器操作系统 </td>
                        <td>Microsoft Windows NT 5.2.3790 Service Pack 2</td>
                    </tr>
                    <tr>
                        <td>系统所在文件夹 </td>
                        <td>C:\WINDOWS\system32</td>
                    </tr>
                    <tr>
                        <td>服务器脚本超时时间 </td>
                        <td>30000秒</td>
                    </tr>
                    <tr>
                        <td>服务器的语言种类 </td>
                        <td>Chinese (People's Republic of China)</td>
                    </tr>
                    <tr>
                        <td>.NET Framework 版本 </td>
                        <td>2.050727.3655</td>
                    </tr>
                    <tr>
                        <td>服务器当前时间 </td>
                        <td>2017-01-01 12:06:23</td>
                    </tr>
                    <tr>
                        <td>服务器IE版本 </td>
                        <td>6.0000</td>
                    </tr>
                    <tr>
                        <td>服务器上次启动到现在已运行 </td>
                        <td>7210分钟</td>
                    </tr>
                    <tr>
                        <td>逻辑驱动器 </td>
                        <td>C:\D:\</td>
                    </tr>
                    <tr>
                        <td>CPU 总数 </td>
                        <td>4</td>
                    </tr>
                    <tr>
                        <td>CPU 类型 </td>
                        <td>x86 Family 6 Model 42 Stepping 1, GenuineIntel</td>
                    </tr>
                    <tr>
                        <td>虚拟内存 </td>
                        <td>52480M</td>
                    </tr>
                    <tr>
                        <td>当前程序占用内存 </td>
                        <td>3.29M</td>
                    </tr>
                    <tr>
                        <td>Asp.net所占内存 </td>
                        <td>51.46M</td>
                    </tr>
                    <tr>
                        <td>当前Session数量 </td>
                        <td>8</td>
                    </tr>
                    <tr>
                        <td>当前SessionID </td>
                        <td>gznhpwmp34004345jz2q3l45</td>
                    </tr>
                    <tr>
                        <td>当前系统用户名 </td>
                        <td>NETWORK SERVICE</td>
                    </tr>
                    <tr>
                        <td>ali_test</td>
                        <td id="ali">ali</td>
                    </tr>
                    <tr>
                        <td>wechat_test</td>
                        <td id="wechat">wechat</td>
                    </tr>
                    <tr>
                        <td>wechat_test</td>
                        <td id="_query">query</td>
                    </tr>
                    <tr>
                        <td>wechat_test</td>
                        <td id="_close">close</td>
                    </tr>
                    <tr>
                        <td>wechat_test</td>
                        <td id="_refund">refund</td>
                    </tr>                
                    <tr>
                        <td>wechat_test</td>
                        <td id="_refundquery">refundquery</td>
                    </tr>
                    <tr>
                        <td>wechat_test</td>
                        <td id="_downloadbill">downloadbill</td>
                    </tr>    
                    <tr>
                        <td>wechat_test</td>
                        <td id="_downloadfundflow">downloadfundflow</td>
                    </tr>                                                            
                </tbody>
            </table>
            <!-- 右侧内容框架，更改从这里结束 -->
          </div>
        </div>
        <!-- 右侧主体结束 -->
        {% endblock %}
    </div>
    <!-- 中部结束 -->

    <!-- 背景切换开始 -->
	<div class="bg-changer">
        <div class="swiper-container changer-list">
            <div class="swiper-wrapper">
                <div class="swiper-slide"><img class="item" src="../../static/images/a.jpg" alt=""></div>
                <div class="swiper-slide"><img class="item" src="../../static/images/b.jpg" alt=""></div>
                <div class="swiper-slide"><img class="item" src="../../static/images/c.jpg" alt=""></div>
                <div class="swiper-slide"><img class="item" src="../../static/images/d.jpg" alt=""></div>
                <div class="swiper-slide"><img class="item" src="../../static/images/e.jpg" alt=""></div>
                <div class="swiper-slide"><img class="item" src="../../static/images/f.jpg" alt=""></div>
                <div class="swiper-slide"><img class="item" src="../../static/images/g.jpg" alt=""></div>
                <div class="swiper-slide"><img class="item" src="../../static/images/h.jpg" alt=""></div>
                <div class="swiper-slide"><img class="item" src="../../static/images/i.jpg" alt=""></div>
                <div class="swiper-slide"><img class="item" src="../../static/images/j.jpg" alt=""></div>
                <div class="swiper-slide"><img class="item" src="../../static/images/k.jpg" alt=""></div>
                <div class="swiper-slide"><span class="reset">初始化</span></div>
            </div>
        </div>
        <div class="bg-out"></div>
        <div id="changer-set"><i class="iconfont">&#xe696;</i></div>   
    </div>

    <!-- 背景切换结束 -->
<script>
    
    //判断是在移动端还是PC端
    function getClientInfo(){  
       var userAgentInfo = navigator.userAgent;  
       var Agents = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod");  
       var agentinfo = null;  
       for (var i = 0; i < Agents.length; i++) {  
           if (userAgentInfo.indexOf(Agents[i]) > 0) { agentinfo = userAgentInfo; break; }  
       }  
       if(agentinfo){
            return agentinfo;
       }else{
            return "PC"; 
       }     
    }

    //在移动端中是否用微信打开
    function is_weixn(){
        var ua = navigator.userAgent.toLowerCase();
        if(ua.match(/MicroMessenger/i)=="micromessenger") {
            return true;
        } else {
            return false;
        }
    }

    //微信内置浏览器调起支付
    function onBridgeReady(appId,timeStamp,nonceStr,package,signType,paySign){
       console.log(appId,timeStamp,nonceStr,package,signType,paySign);
       WeixinJSBridge.invoke(
          'getBrandWCPayRequest', {
             "appId":appId,     //公众号名称，由商户传入     
             "timeStamp":timeStamp,         //时间戳，自1970年以来的秒数     
             "nonceStr":nonceStr, //随机串     
             "package":package,     
             "signType":signType,         //微信签名方式：     
             "paySign":paySign //微信签名 
          },
          function(res){
          if(res.err_msg == "get_brand_wcpay_request:ok" ){
          // 使用以上方式判断前端返回,微信团队郑重提示：
          //res.err_msg将在用户支付成功后返回ok，但并不保证它绝对可靠。
          } else if (res.err_msg == "get_brand_wcpay_request:cancel") {
                    alert("用户取消支付!");
                    }
            else{
            alert(JSON.stringify(res));
            console.log(JSON.stringify(res));
          }
       }); 
    }


    $("#ali").on("click",function(){

        $.ajax({
            url:"/app/alipay",
            contentType:'application/json',
            success:function(res){
                if(res.status == 0){   

                }else {

                }
            }
        })
    })

    $("#wechat").on("click",function(){

        $.getScript('http://pv.sohu.com/cityjson',function(){
            var cip = returnCitySN["cip"];
            var cname = returnCitySN["cname"];
            var check_is_wechat = is_weixn();
            var check_is_pc = getClientInfo();
            params = {
                "ip":cip,
                "cname":cname,
                "is_wechat_open":check_is_wechat,
                "check_is_pc":check_is_pc,
                    };

                $.ajax({
                    url:"/app/wechat/pay",
                    contentType:'application/json', 
                    type:"POST",
                    data:JSON.stringify(params),
                    success:function(res){
                        if(res.status == 0){   
                            location.href=res.msg;
                        }else if(res.status == 1){
                            onBridgeReady(res.data.appId,res.data.timeStamp,res.data.nonceStr,res.data.package,res.data.signType,res.data.paySign);
                        }else{
                            alert('error');
                        }
                    }
                })
            
        });
    });
        
    $("#_query").on("click",function(){

        $.ajax({
            url:"/app/wechat/query_order",
            contentType:'application/json',
            type:"POST",
            success:function(res){
                if(res.status == 0){   
                    alert(res.msg);
                }else {
                    alert('error');
                }
            }
        })
    });

        $("#_close").on("click",function(){

        $.ajax({
            url:"/app/wechat/close_order",
            contentType:'application/json',
            type:"POST",
            success:function(res){
                if(res.status == 0){   
                    alert(res.msg);
                }else {
                    alert('error');
                }
            }
        })
    });
        $("#_refund").on("click",function(){

        $.ajax({
            url:"/app/wechat/refund_order",
            contentType:'application/json',
            type:"POST",
            success:function(res){
                if(res.status == 0){   
                    alert(res.msg);
                }else {
                    alert('error');
                }
            }
        })
    });
        $("#_refundquery").on("click",function(){

        $.ajax({
            url:"/app/wechat/refund_query",
            contentType:'application/json',
            type:"POST",
            success:function(res){
                if(res.status == 0){   
                    alert(res.msg);
                }else {
                    alert('error');
                }
            }
        })
    });

        $("#_downloadbill").on("click",function(){

        $.ajax({
            url:"/app/wechat/downloadbill",
            contentType:'application/json',
            type:"POST",
            success:function(res){
                if(res.status == 0){   
                    alert(res.msg);
                }else {
                    alert('error');
                }
            }
        })
    });
        $("#_downloadfundflow").on("click",function(){

        $.ajax({
            url:"/app/wechat/downloadfundflow",
            contentType:'application/json',
            type:"POST",
            success:function(res){
                if(res.status == 0){   
                    alert(res.msg);
                }else {
                    alert('error');
                }
            }
        })
    });

</script>


    {% block script %}
    {% endblock %}
</body>
</html>